<template>
	<view class="container">
		<tui-navigation-bar @init="initNavigation" :isOpacity="false" :maxOpacity="1" :scrollTop="scrollTop"
			backgroundColor="#fff" color="#333" :title="pageTitle" shadow>
			<view class="tui-header" :style="{ marginTop: navBarTop + 'px' }">
				<view class="get-back dy-iconfont icon-qiehuanqizuo" @click="goBack('pages/user/index')"></view>
			</view>
		</tui-navigation-bar>
		<view class="main">
			<view class="main-loading">
				<uv-loading-icon :show="!appraise.loading" :size="28" timing-function="linear"
					mode="circle"></uv-loading-icon>
			</view>
			<view class="appraise-list" v-if="appraise.list.length > 0">
				<view class="appraise-item" v-for="(item ,index) in appraise.list" :key="item.id"
					:class="{'noBorder': index == appraise.list.length - 1,'appraise-item-top': item.pinnedState == 0}">
					<image class="top-icon" v-if="item.pinnedState == 0"
						src="https://pengtou-1322587508.cos.ap-shanghai.myqcloud.com/static/images/user/top.png"
						mode="widthFix"></image>
					<post-item :size="'90rpx'" from="myPost" :state="item.auditState" :post_type="item.forumType" :basicsWidth="widthrpx"
						:postIndex="index" :post="item" @clickHead="clickHead" @clickVideo="clickVideo" @share="share"
						@comment="comment" @previewImg="previewImg" @selectMedia="selectMedia">
					</post-item>
				</view>
			</view>
			<view v-show="appraise.loading && appraise.list.length <= 0">
				<empty
					:image="'https://pengtou-1322587508.cos.ap-shanghai.myqcloud.com/static/images/empty/empty-community.png'"
					fixed>
					还没有发布动态
				</empty>
			</view>
			<view v-show="load.loading">
				<uv-load-more :status="load.status" :loading-text="load.loadingText" :nomore-text="load.nomoreText"
					:line="load.status == 'nomore'" />
			</view>
		</view>
		<!-- 评论列表 -->
		<uv-popup ref="popup" bgColor="none" mode="bottom" zIndex="2580" :overlayOpacity="0.4">
			<view class="popup-comment">
				<view class="header">
					<view class="title">评论({{replyNum}}条)</view>
					<view class="close" @tap="closePop"><text class="dy-iconfont icon-a-bianzu69"></text>
					</view>
				</view>
				<!-- -- 评论列表 -- -->
				<comment ref="comment" :list="commentList.list" @onInfo="onInfo" scroll :commentInfo="commentInfo"
					@scrolltolower="commentScrolltolower" :commentLoad="commentLoad" @getMore="getMore"
					@longpressHandler="longpressHandler" @removeResolve="removeResolve"></comment>
				<view class="foot">
					<view class="foot-box">
						<view class="foot-input">
							<text @tap.stop.prevent="tapInput" class="input-text">{{inputText || '说点什么…'}}</text>
							<text @tap.stop.prevent="tapEmoji" class="dy-iconfont icon-xingzhuangjiehebeifen"></text>
						</view>
					</view>
				</view>
			</view>
		</uv-popup>
		<comment-foot ref="commentFoot" :list="commentList.list" @onReply="onReply" @changinput="changinput"
			@footInputClose="footInputClose" :placeholder="placeholder"></comment-foot>
		<uv-toast ref="toast"></uv-toast>
		<uv-popup :safeAreaInsetBottom="false" ref="popup2" mode="bottom" round="20">
			<view class="delete-pop-menu" v-if="postItem">
				<view class="menu-list" v-for="(item,index) in list" :key="item.lable" @tap="selectMenu(item,index)">
					<view class="dy-iconfont" :class="item.lable == 'top'? 'icon-a-bianzu59': 'icon-a-bianzu58'"></view>
					<view v-if="index == 0">{{postItem.pinnedState == 0 ? '取消置顶' : '置顶'}}</view>
					<view v-if="index == 1">{{item.name}}</view>
				</view>
			</view>
		</uv-popup>
		<uv-popup :safeAreaInsetBottom="false" ref="popup3" mode="bottom" round="20">
			<view class="delete-pop">
				<view class="header">
					<view class="title"></view>
					<view class="close" @tap="close"><text class="dy-iconfont icon-a-bianzu69"></text></view>
				</view>
				<view class="delete-hint">确认要删除动态吗？</view>
				<view class="btn-box">
					<view class="look" @tap="close">取消</view>
					<button class="btn-primary btn-submit" @tap.stop.prevent="onSubmit">确认</button>
				</view>
			</view>
		</uv-popup>
		<uv-popup :safeAreaInsetBottom="false" ref="popupmenu" mode="bottom" round="20" zIndex="2582">
			<view class="delete-pop-menu-2">
				<view class="menu-list" :class="{'delete':item.lable == 'delete'}"
					v-for="(item,index) in commentMenuList" :key="item.lable"
					@tap.stop.prevent="selectCommentMenu(item)">
					<view>{{item.name}}</view>
				</view>
			</view>
		</uv-popup>
		<l-painter ref="painter" hidden />
		<survey-pop></survey-pop>
	</view>
</template>

<script>
	import mp from "@/mixins/mp.js";
	import throttle from '@/uni_modules/uv-ui-tools/libs/function/throttle.js';
	const app = getApp();
	export default {
		mixins: [mp],
		options: {
			styleIsolation: 'shared'
		}, //解决/deep/不生效**
		components: {},
		data() {
			return {
				navBarOpacity: 0, //标题图标距离顶部距离
				scrollTop: 0.5, //页面滚动高度
				navBarTop: 0, // 导航栏content顶部m-top
				skeletonShow: true, //加载
				pageTitle: '我的动态', //标题
				apse: null,
				postItem: null,
				appraise: {
					list: [],
					hasMore: false,
					loading: true,
					page: 1,
				},
				load: {
					loading: false,
					status: 'loading',
					loadingText: '努力加载中',
					nomoreText: '没有更多了'
				},
				// list: [{
				// 	name: '置顶',
				// 	lable: 'top'
				// }, {
				// 	name: '删除',
				// 	lable: 'delete'
				// }],
				list: [{
					name: '置顶',
					lable: 'top'
				}],
				appraiseTab: {
					tab: [{
						value: '我评价的',
						id: 'my'
					}, {
						value: '我收到的',
						id: 'receive'
					}],
					current: 'my'
				},
				widthrpx: 0,
				rpx: app.globalData.widthPx / 750,
				basicsWidthPx: '',

				commentList: {
					list: [],
					hasMore: false,
					loading: false,
					page: 1,
				},
				inputText: '',
				placeholder: '说点什么...',
				commentLoad: {
					loading: false,
					status: 'loading',
					loadingText: '努力加载中',
					nomoreText: '没有更多了'
				},
				replyNum: 0,
				shareItem: null,
				commentInfo: null,
				replyinfo: null,
				replyIndex: 0,
				commentMenuList: [{
					name: '复制评论',
					lable: 'copy'
				}],
				longpressInfo: null,
			};
		},
		/**
		 * 计算属性
		 */
		computed: {},
		onLoad(options) {
			this.getPageData()
		},
		onShow: function() {
			this.widthrpx = app.globalData.systemInfo.windowWidth / this.rpx - 32 * 2 - 106
			this.basicsWidthPx = ['web', 'h5'].includes(app.globalData.systemInfo.uniPlatform) ? -(this.widthrpx * this
				.rpx) + 'px' : (-this.widthrpx) + 'rpx'
		},
		/**
		 * 下拉
		 */
		onPullDownRefresh: function() {
			this.appraise.page = 1
			this.getPageData()
		},
		/**
		 * 触底
		 */
		onReachBottom() {
			if (this.appraise.hasMore && this.appraise.loading) {
				this.load.loading = true
				this.getPageData()
			}
		},
		/**
		 * 滚动
		 */
		onPageScroll(res) {
			this.scrollTop = res.scrollTop;
		},
		onShareAppMessage: function(res) {
			const that = this;
			let title = 'PENG一下，趣收获'
			let desc = 'PENG一下，趣收获'
			let path = '/pages/index/index'
			let imageUrl = 'https://pengtou-1322587508.cos.ap-shanghai.myqcloud.com/static/images/share/share-1.png'
			if (res.from === 'button') {
				// 来自页面内转发按钮
				title = this.shareItem.content
				desc = this.shareItem.content
				path = '/page_community/details/details?id=' + that.shareItem.id + '&from=share',
				imageUrl = this.shareItem.forumPictureList[0].fileUrl
			}
			//转发参数
			return {
				// 转发的标题
				title: title,
				desc: desc,
				path: path,
				//自定义图片路径，可以是本地文件路径、代码包文件路径或者网络图片路径，
				//支持PNG及JPG，不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
				imageUrl: imageUrl
			}
		},
		methods: {
			goLogin() {
				app.doLogin()
			},
			initNavigation(e) {
				this.navBarOpacity = e.opacity;
				this.navBarTop = e.top;
			},
			// 返回上一页
			goBack: function(url) {
				if (url) {
					app.navigationTo(url)
				} else {
					app.beNavigateBack();
				}
			},
			// 加载页面数据
			getPageData: function(callback) {
				Promise.all([this.requestPengList()]).then(() => {
					uni.stopPullDownRefresh();
				});
			},
			requestPengList() {
				return new Promise((resolve, reject) => {
					this.appraise.loading = false
					app._post_form(
						"/client/forum/personnel-forum-page", {
							current: this.appraise.page,
							extra: {},
							model: {
								forumType: 1,
								userId: null
							},
							order: "descending",
							size: 10,
							sort: "createTime"
						},
						(result) => {
							let {
								records,
								total
							} = result.data;
							let {
								page,
								list,
								hasMore
							} = this.appraise;
							if (1 == page) {
								list.length = 0;
							}
							records.forEach(item => {
								item.animation = false
								item.vanish_animation = false
								item.isZan = false
							})
							list = [...list, ...records];
							hasMore = total > list.length;
							this.appraise.list = list;
							this.appraise.hasMore = hasMore;
							if (hasMore) {
								page++;
								this.load.loading = false
							} else if (list.length > 3) {
								this.load.loading = true
								this.load.status = 'nomore'
							} else {
								this.load.status = 'nomore'
							}
							this.appraise.page = page;
						}, null, () => {
							resolve();
							this.appraise.loading = true
						}
					);
				});
			},
			onDelete(item, index) {
				this.apse = {
					item: item,
					index: index
				}
				this.$refs.popup3.open();
			},
			selectMedia(e) {
				let {
					item,
					index
				} = e;
				this.postItem = item
				this.$set(this.postItem, 'index', index)
				if (item.auditState == 3) {
					this.list = [{
						name: '置顶',
						lable: 'top'
					}, {
						name: '删除',
						lable: 'delete'
					}]
				} else {
					this.list = [{
						name: '置顶',
						lable: 'top'
					}]
				}
				this.$refs.popup2.open();
			},
			selectMenu(item, index) {
				if (item.lable == 'top') {
					this.onTop()
				} else {
					this.$refs.popup2.close();
					this.onDelete()
				}
			},
			close() {
				this.$refs.popup3.close();
			},
			onTop() {
				return new Promise((resolve, reject) => {
					this.$refs.toast.show({
						type: 'loading',
					})
					app._post_form(
						"/client/my/pinned-forum", this.postItem.id,
						(result) => {
							this.$refs.popup2.close();
							this.appraise.page = 1
							this.getPageData()
							setTimeout(() => {
								this.$refs.toast.show({
									type: 'success',
									message: this.postItem.pinnedState == 0 ? '已取消置顶' : "置顶成功"
								})
								setTimeout(() => {
									this.$refs.toast.hide()
								}, 1000)
							}, 200)
						}, null, () => {
							this.$refs.toast.hide()
							resolve();
						}
					);
				});
			},
			onSubmit() {
				return new Promise((resolve, reject) => {
					this.$refs.toast.show({
						type: 'loading',
					})
					app._post_form(
						"/client/my/remove/posting-forum", this.postItem.id,
						(result) => {
							this.$refs.toast.hide()
							this.close()
							this.appraise.list.splice(this.postItem.index, 1);
							setTimeout(() => {
								this.$refs.toast.show({
									type: 'success',
									message: "删除成功"
								})
								setTimeout(() => {
									this.$refs.toast.hide()
								}, 1000)
							}, 200)
						}, null, () => {
							this.close()
							this.$refs.toast.hide()
							resolve();
						}
					);
				});
			},

			//  ------------------------------------------------------------
			previewImg(e) {
				return new Promise((resolve, reject) => {
					app._post_form("/client/forum-topic/submit-forum-view", {
							"list": [{
								"forumId": e.id,
								"topicId": e.topicId
							}]
						},
						(result) => {
							resolve();
						}, null, () => {
							reject();
						}
					);
				});
			},
			// 分享开始 ----------------------------------
			getShareCode(id) {
				return new Promise((resolve, reject) => {
					app._post_form(
						"/client/qr/create-wx-code", {
							envVersion: 'release',
							forumId: id,
							path: "page_community/details/details?id=" + id + '&from=share',
						},
						(result) => {
							let res = result.data
							resolve(res);
						}, null, () => {
							resolve(false);
						}
					);
				});
			},
			
			async share(e) {
				let that = this
				that.$refs.toast.show({
					type: 'loading',
				})
				const shareCode = await that.getShareCode(e.id)
				that.mp.poster.views[1].views[0].src = e.avatar
				that.mp.poster.views[1].views[1].text = e.nickName
				that.mp.poster.views[1].views[3].text = e.cityName
				that.mp.poster.views[2].views[0].text = e.content
				that.mp.poster.views[3].views[0].src = shareCode.url
			
				if (!e.forumPictureList) {
					that.mp.poster.css.height = "462rpx"
					that.mp.poster.css.padding = "56rpx 47rpx 16rpx 38rpx"
					that.mp.poster.css.backgroundImage =
						'url("https://pengtou-1322587508.cos.ap-shanghai.myqcloud.com/static/images/community/poser-bg-w2.png")'
					that.mp.poster.views[0].css.width = "0"
					that.mp.poster.views[0].css.height = "0"
					that.mp.poster.views[0].css.marginBottom = "0"
					that.mp.poster.views[1].css.marginBottom = "50rpx"
				} else {
					that.mp.poster.css.height = "1039rpx"
					that.mp.poster.css.padding = "64rpx 38rpx 16rpx 38rpx"
					that.mp.poster.css.backgroundImage =
						'url("https://pengtou-1322587508.cos.ap-shanghai.myqcloud.com/static/images/community/poser-bg-h2.png")'
					that.mp.poster.views[0].css.width = "576rpx"
					that.mp.poster.views[0].css.height = "576rpx"
					that.mp.poster.views[0].css.marginBottom = "46rpx"
					that.mp.poster.views[0].src = e.forumPictureList[0].coverPictureUrl ? e.forumPictureList[0]
						.coverPictureUrl : e.forumPictureList[0].fileUrl
				}
				// 渲染
				that.$refs.painter.render(that.mp.poster);
				// 生成图片
				that.$refs.painter.canvasToTempFilePathSync({
					fileType: "jpg",
					// 如果返回的是base64是无法使用 saveImageToPhotosAlbum，需要设置 pathType为url
					pathType: 'url',
					quality: 1,
					success: (res) => {
						that.$refs.toast.hide()
						wx.showShareImageMenu({
							path: res.tempFilePath,
							success: () => {},
						})
					},
					fail: () => {
						that.$refs.toast.hide()
					}
				});
			},
			// 分享结束 ----------------------------------
			clickHead(e) {
				// app.navigationTo('page_sharing/accompany/details?id=' + e.id + '&from=1')
			},
			clickVideo(item) {},
			// 评价开始 ------------------------------------------------------------
			
			// 长按
			longpressHandler(e) {
				this.longpressInfo = e
				if (e.delete_status) {
					this.$set(this.commentMenuList, 1, {
						name: '删除',
						lable: 'delete'
					})
				} else {
					this.commentMenuList.splice(1, 1)
				}
				this.$refs.popupmenu.open();
			},
			selectCommentMenu(item) {
				let that = this
				if (item.lable == 'copy') {
					uni.setClipboardData({
						data: that.longpressInfo.item.comment,
						showToast: false,
						success: function() {
							that.$refs.popupmenu.close();
							that.$refs.toast.show({
								type: 'default',
								message: "复制成功"
							})
							setTimeout(() => {
								that.$refs.toast.hide()
							}, 1000)
						}
					});
				} else if (item.lable == 'delete') {
					that.$refs.popupmenu.close();
					that.$refs.comment.deleteComment()
				}
			},
			removeResolve() {
				let that = this
				that.$refs.toast.show({
					type: 'default',
					message: "删除成功"
				})
				setTimeout(() => {
					that.$refs.toast.hide()
				}, 1000)
			},
			// 长按结束 --------

			commentScrolltolower() {
				if (this.commentList.hasMore && !this.commentList.loading) {
					this.commentLoad.loading = true
					this.getCommentList()
				}
			},
			// 子评论列表查询
			getMore(e) {
				this.$set(this.commentList.list[e.index], 'clientForumCommentPage', e)
			},

			// 评论列表查询
			getCommentList(id) {
				return new Promise((resolve, reject) => {
					this.commentList.loading = false
					app._post_form("/client/forum-comment/query-page", {
							current: this.commentList.page,
							extra: {},
							model: {
								forumId: this.commentInfo.id,
							},
							order: "descending",
							size: 10,
							sort: "createTime"
						},
						(result) => {
							let {
								records,
								total
							} = result.data;
							let {
								page,
								list,
								hasMore
							} = this.commentList;
							if (1 == page) {
								list.length = 0;
							}
							records.forEach((item, index) => {
								item.clientForumCommentPage = {
									list: item.clientForumCommentPageVO ? [item.clientForumCommentPageVO] : [],
									hasMore: item.commentNum > 1 ? true : false,
									loading: false,
									page: 1,
									index: 0
								}
							})

							list = [...list, ...records];
							hasMore = total > list.length;
							if (hasMore) {
								page++;
								this.commentLoad.loading = false
							} else if (list.length > 3) {
								this.commentLoad.loading = true
								this.commentLoad.status = 'nomore'
							} else {
								this.commentLoad.status = 'nomore'
							}
							this.commentList.hasMore = hasMore;
							this.commentList.list = list;
							this.commentList.page = page;
							resolve();
						}, null, () => {
							reject();
						}
					);
				});
			},

			// 评价列表&&弹窗
			comment(e) {
				let that = this
				that.$refs.toast.show({
					type: 'loading',
				})
				that.commentList = {
					list: [],
					hasMore: false,
					loading: false,
					page: 1,
				}
				that.replyNum = e.forumCommentNum
				that.commentInfo = e
				that.getCommentList(e.id).then(() => {
					that.$refs.toast.hide()
					that.$refs.popup.open();
					that.placeholder = '说点什么...'
				}).catch(() => {
					that.$refs.toast.hide()
				})
			},
			// 关闭评价列表弹窗
			closePop() {
				this.$refs.popup.close();
			},
			// 点表情
			tapEmoji() {
				this.replyinfo = this.commentInfo
				this.$refs.commentFoot.tapEmoji();
			},
			// 点输入框block
			tapInput() {
				this.replyinfo = this.commentInfo
				this.$refs.commentFoot.tapInput();
			},
			// 点用户回复
			onInfo(e) {
				if (e.index) {
					this.replyIndex = e.index
				}
				this.replyinfo = e.item
				this.placeholder = '回复@' + e.item.userName
				this.$refs.commentFoot.tapInput();
			},
			// 用户输入
			changinput(e) {
				this.inputText = e
			},
			// 输入框弹窗关闭
			footInputClose() {
				if (!this.inputText) {
					setTimeout(() => {
						this.placeholder = '说点什么...'
					}, 200)
				}
			},
			// 回复内容校验
			validMessages(str) {
				var re = /\S/
				return re.test(str)
			},
			// 回复
			onReply(e) {
				let that = this
				if (!that.validMessages(that.inputText)) {
					that.$refs.toast.show({
						type: 'default',
						message: "请输入回复内容"
					})
					setTimeout(() => {
						that.$refs.toast.hide()
					}, 1000)
					return
				}
				if (!e) {
					that.$refs.toast.show({
						type: 'default',
						message: "输入文字不合法"
					})
					setTimeout(() => {
						that.$refs.toast.hide()
					}, 1000)
					return
				}
				throttle(app._post_form('/client/forum-topic/submit-comment', {
					comment: that.inputText,
					commentType: that.replyinfo.type == 'comment' ? 0 : 1,
					forumId: that.replyinfo.type == 'comment' ? that.replyinfo.forumId : that.replyinfo.id,
					commentId: that.replyinfo.type == 'comment' ? that.replyinfo.commentId : null,
				}, (result) => {
					let data = Object.assign(result.data, {
						clientForumCommentPage: {
							list: [],
							hasMore: true,
							loading: false,
							page: 1,
							index: 0
						}
					})
					that.inputText = ''
					that.$refs.commentFoot.changinputSec()
					uni.hideKeyboard();
					that.$refs.toast.show({
						type: 'default',
						message: "评论成功"
					})
					setTimeout(() => {
						that.$refs.toast.hide()
					}, 1000)
					if (that.replyinfo.type == 'post') {
						data.commentNum = 0
						that.replyNum =  Number(that.replyNum) + 1
						that.$refs.comment.goTop()
						that.commentList.list.unshift(data)
					} else {
						that.replyNum = Number(that.replyNum) + 1
						that.$refs.comment.onReplyChild(data)
					}
				}, null, (err) => {
					that.inputText = ''
					that.$refs.commentFoot.changinputSec()
				}), 1000, true)
			},
			// 评价结束 ------------------------------------------------------------
		},
	};
</script>
<style lang="scss" scoped>
	.container {
		min-height: 100vh;
		background: #FFF;

		.tui-header {
			width: 100%;
			position: fixed;
			top: 0;
			padding: 0 42rpx;
			display: flex;
			align-items: center;
			height: 32px;
			transform: translateZ(0);
			z-index: 99999;
			box-sizing: border-box;

			.get-back {
				flex-shrink: 0;
				width: 36rpx;
				height: 36rpx;
				color: #000;
				font-size: 36rpx;
				padding: 2rpx 40rpx 2rpx 2rpx;
			}
		}

		.main {
			box-sizing: border-box;
			padding: 91px 0 66rpx;
			/* #ifdef H5 */
			padding: 88rpx 0 66rpx;
			/* #endif */



			.appraise-tab {
				position: fixed;
				z-index: 2;
				width: 100%;
				top: 171rpx;
				display: flex;
				align-items: center;
				box-sizing: border-box;
				padding: 30rpx 48rpx;
				background: #FFFFFF;
				box-shadow: 2rpx 10rpx 20rpx -8rpx rgba(198, 204, 202, 0.3);

				.tab {
					font-size: 30rpx;
					font-weight: 900;
					color: #999999;
					line-height: 44rpx;
					margin-right: 28rpx;
					transition: all 0.3s;


					&.active {
						font-size: 32rpx;
						font-weight: 900;
						color: #222222;
						line-height: 44rpx;
					}
				}
			}

			.main-loading {
				position: absolute;
				top: 50%;
				left: 50%;
				transform: translateX(-50%);
			}

			.appraise-list {
				.appraise-item {
					box-sizing: border-box;
					padding: 36rpx 32rpx;
					// border-bottom: 2rpx solid #E3E9E5;

					&.noBorder {
						border: none;
					}

					&.appraise-item-top {
						background: #FFFFFF linear-gradient(180deg, rgba(246, 255, 226, 0.84) 0%, #FFFFFF 100%);
						position: relative;

						.top-icon {
							width: 192rpx;
							position: absolute;
							top: -36rpx;
							right: -18rpx;
						}
					}
				}

				.post {
					.post-info {
						display: flex;
						width: 100%;
						margin-bottom: 16rpx;

						.head {
							flex-shrink: 0;
							margin-right: 16rpx;
						}

						&.dynamic {
							.user-info {
								.user-info-header {
									flex-direction: column;
									align-items: flex-start;
								}
							}
						}

						.user-info {
							display: flex;
							align-items: center;
							flex-wrap: wrap;

							.user-info-header {
								display: flex;
								align-items: center;
								justify-content: space-between;
								margin-bottom: 5rpx;
								width: 100%;

								.user-name {
									font-size: 28rpx;
									font-weight: 900;
									color: #222222;
									line-height: 44rpx;
									margin-right: 20rpx;

									.auditing,
									.audit-f {
										display: inline-block;
										box-sizing: border-box;
										padding: 1rpx 15rpx 1rpx 42rpx;
										background: linear-gradient(270deg, #FFBF12 0%, rgba(255, 191, 18, 0) 100%);
										border-radius: 30rpx;
										line-height: 33rpx;
										font-size: 24rpx;
										font-weight: 400;
										color: #282D2D;
										position: relative;
										margin-left: 20rpx;

										&::before {
											content: "";
											display: block;
											width: 48rpx;
											height: 48rpx;
											background-image: url('https://pengtou-1322587508.cos.ap-shanghai.myqcloud.com/static/images/community/no_rz.png');
											background-size: 100%;
											position: absolute;
											left: -10rpx;
											bottom: 50%;
											transform: translateY(50%);
										}
									}
								}

								.data {
									font-size: 24rpx;
									font-weight: 400;
									color: #999999;
									line-height: 44rpx;
									flex-shrink: 0;
								}

								.recommend {
									flex-shrink: 0;
									font-size: 24rpx;
									font-weight: 400;
									color: #272636;
									position: relative;
									z-index: 2;
								}

								.auditing,
								.audit-f {
									flex-shrink: 0;
									box-sizing: border-box;
									padding: 1rpx 15rpx 1rpx 42rpx;
									background: linear-gradient(270deg, #FFBF12 0%, rgba(255, 191, 18, 0) 100%);
									border-radius: 30rpx;
									line-height: 33rpx;
									font-size: 24rpx;
									font-weight: 400;
									color: #282D2D;
									position: relative;

									&::before {
										content: "";
										display: block;
										width: 48rpx;
										height: 48rpx;
										background-image: url('https://pengtou-1322587508.cos.ap-shanghai.myqcloud.com/static/images/community/no_rz.png');
										background-size: 100%;
										position: absolute;
										left: -10rpx;
										bottom: 50%;
										transform: translateY(50%);
									}
								}

								// .audit-f{}
							}

							.data {
								font-size: 24rpx;
								font-weight: 400;
								color: #999999;
								line-height: 44rpx;
								flex-shrink: 0;
							}
						}
					}

					.content {
						box-sizing: border-box;
						padding-left: 94rpx;
						font-size: 28rpx;
						font-weight: 400;
						color: #222222;
						line-height: 44rpx;
						margin-bottom: 16rpx;
					}

					.image-list {
						padding-left: 94rpx;
					}

					.order {
						box-sizing: border-box;
						padding-left: 94rpx;
						margin-top: 24rpx;

						.order-box {
							width: 100%;
							box-sizing: border-box;
							padding: 24rpx 28rpx;
							background: #F6F8F7;
							border-radius: 12rpx;
						}

						.order-per {
							max-width: 80%;
							font-size: 28rpx;
							font-weight: 900;
							color: #222222;
							line-height: 44rpx;
							display: flex;
							align-items: center;

							.name {
								display: inline-block;
								max-width: 60%;
							}
						}

						.order-time {
							font-size: 24rpx;
							font-weight: 400;
							color: #222222;
							line-height: 44rpx;
							margin-top: 4rpx;
						}
					}

					.delete {
						width: 100rpx;
						height: 36rpx;
						background: #FFFFFF;
						border-radius: 20rpx;
						border: 2rpx solid #7B867F;
						font-size: 24rpx;
						font-weight: 400;
						color: #999B9B;
						line-height: 36rpx;
						text-align: center;
						margin-top: 16rpx;
						margin-left: auto;
					}
				}
			}
		}

		.delete-pop-menu {
			background: #FFFFFF;
			box-sizing: border-box;
			padding: 50rpx 24rpx 66rpx;
			position: relative;

			.menu-list {
				padding: 43rpx 0 43rpx 40rpx;
				position: relative;
				font-size: 32rpx;
				font-weight: 400;
				color: #282D2D;
				line-height: 45rpx;
				border-bottom: 2rpx solid #E3E9E5;
				display: flex;

				&:last-child {
					border: none;
				}

				.dy-iconfont {
					margin-right: 25rpx;
				}
			}
		}

		.delete-pop {
			background: #FFFFFF;
			box-sizing: border-box;
			padding: 43rpx 31rpx 66rpx;
			position: relative;

			.header {
				display: flex;
				align-items: center;
				justify-content: space-between;
				box-sizing: border-box;

				.title {
					font-size: 32rpx;
					font-weight: 900;
					color: #282D2D;
					line-height: 45rpx;
				}

				.close {
					font-size: 22rpx
				}
			}

			.delete-hint {
				font-size: 32rpx;
				font-weight: 900;
				color: #282D2D;
				line-height: 45rpx;
				margin: 27rpx 0 49rpx 0;
				text-align: center;
			}

			.btn-box {
				display: flex;
				align-items: center;
				justify-content: space-between;

				.look {
					width: calc((100% - 24rpx)/2);
					background: #FFFFFF;
					border-radius: 20rpx;
					border: 2rpx solid #7B867F;
					font-size: 32rpx;
					font-weight: 900;
					color: #999B9B;
					height: 84rpx;
					line-height: 84rpx;
					text-align: center;
				}

				.btn-submit {
					width: calc((100% - 24rpx)/2);
					// height: 102rpx;
					// line-height: 102rpx;
				}
			}
		}
	}

	.popup-comment {
		box-sizing: border-box;
		padding: 48rpx 48rpx 132rpx;
		background: #FFFFFF;
		border-radius: 40rpx 40rpx 0px 0px;

		.header {
			display: flex;
			align-items: center;
			justify-content: space-between;
			box-sizing: border-box;
			padding-bottom: 41rpx;

			.title {
				font-size: 32rpx;
				font-weight: 900;
				color: #282D2D;
				line-height: 45rpx;
			}

			.close {
				font-size: 22rpx
			}
		}
	}

	.foot {
		box-shadow: 0px 0 9rpx 0px rgba(198, 204, 202, 0.56);
		position: absolute;
		background: #FFFFFF;
		width: 100vw;
		bottom: 0;
		left: 0;
		padding-bottom: constant(safe-area-inset-bottom);
		padding-bottom: env(safe-area-inset-bottom);

		.foot-box {
			box-sizing: border-box;
			padding: 34rpx 36rpx;
			background: #FFFFFF;

			&.foot-input-pop {
				position: relative;
				transition: bottom 300ms ease-out 0ms, -webkit-transform 300ms ease-out 0ms, transform 300ms ease-out 0ms;
				transform-origin: 50% 50%;
			}

			.foot-input {
				box-sizing: border-box;
				padding: 12rpx 36rpx;
				width: 100%;
				height: 64rpx;
				background: #F6F8F7;
				border-radius: 39rpx;
				font-size: 28rpx;
				font-weight: 400;
				color: #999B9B;
				line-height: 40rpx;
				display: flex;
				align-items: center;
				justify-content: space-between;

				.input-text {
					flex: 1;
				}

				.icon-xingzhuangjiehebeifen {
					color: #282D2D;
					font-size: 40rpx;
					padding-left: 30rpx;
				}
			}
		}
	}
	.delete-pop-menu-2 {
		background: #FFFFFF;
		box-sizing: border-box;
		padding: 0 25rpx 0;
		padding-bottom: constant(safe-area-inset-bottom);
		padding-bottom: env(safe-area-inset-bottom);
		position: relative;
	
		.menu-list {
			padding: 38rpx 0;
			position: relative;
			font-size: 32rpx;
			font-weight: 400;
			color: #282D2D;
			line-height: 45rpx;
			border-bottom: 2rpx solid #E3E9E5;
			// display: flex;
			text-align: center;
	
			&.delete {
				color: #FF4664;
			}
	
			&:last-child {
				border: none;
			}
	
			.dy-iconfont {
				margin-right: 25rpx;
			}
		}
	}
</style>